package com.htl.exampro.exam.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.htl.exampro.exam.pojo.domain.ExamHistoryDO;
import com.htl.exampro.exam.pojo.domain.ExamResultDO;
import com.htl.exampro.exam.pojo.query.ExamResultPageParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 成绩表 Mapper 接口
 * </p>
 *
 * @author hehehe
 * @since 2025-05-26
 */
@Mapper
public interface ExamResultMapper extends BaseMapper<ExamResultDO> {

    Page<ExamHistoryDO> getExamHistoryPage(Page<ExamHistoryDO> page, @Param("param") ExamResultPageParam param);

    // 查询某学生答题详情
    Map<String, Object> getAnswerDetail(@Param("examId") Long examId, @Param("resultId") Long resultId);

    List<Map<String, Object>> getAnswerDetailList(@Param("resultId") Long resultId);
}
